package com.leave.mos.controller;

import com.leave.mos.entity.User;
import com.leave.mos.service.MongodbSaveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName MongodbSaveController
 * @Description TODO
 * @Author lh
 * @Date 2021/7/7 17:42
 * @Version 1.0
 **/

@RestController
@RequestMapping("save")
public class MongodbSaveController {

    @Autowired
    private MongodbSaveService mongodbSaveService;

    @RequestMapping("/save")
    User save(User user){
        return mongodbSaveService.save(user);
    }

    @RequestMapping("saveTable")
    User saveTable(User user){
       return mongodbSaveService.saveTable(user);
    }

}
